<div class="row">
	<div class="col-xs-12 col-sm-12 col-md-12 col-lg-4">
		<h1 class="page-title txt-color-blueDark"><i class="fa-fw fa fa-user"></i> {:W('Nav/navTop')}
            <img src="{$Think.config.SUB_PATH}{$rel[pic]}" >
		</h1>
	</div>
	</div>
				<!-- row -->
				<div class="row">

					<div class="col-sm-12">

						<div class="well">
                            <form action="{$Think.config.SUB_PATH}index.php?m=admin&c=User&a=userEdit&id={:I('get.id')}" id="user-form" role="form" method="post"  class="smart-form">
								<fieldset>
							<section>
									<label class="input"> 
										<i class="icon-prepend fa fa-envelope-o"></i>
										<input type="email" name="user_email" placeholder="{:L('user_email')}" value="{$rel[email]}">
										<b class="tooltip tooltip-bottom-left">{:L('user_email_tip')}</b>
									</label>
							</section>
							<section>
									<label class="input"> 
										<i class="icon-prepend fa fa-lock"></i>
										<input type="password" name="user_pwd" placeholder="{:L('user_pwd')}" id="password" value="">
										<b class="tooltip tooltip-bottom-left show">{:L('user_pwd_edit_tip')}</b>
									</label>
							</section>
							
								
							</fieldset>
							<fieldset>
								<div class="row">
									<section class="col col-6">
										<label class="input">
											<i class="icon-prepend fa fa-user"></i>
											<input type="text" name="user_name" placeholder="{:L('user_name')}" value="{$rel[real_name]}">
											<b class="tooltip tooltip-bottom-left">{:L('user_name_tip')}</b> 
										</label>
									</section>
									<section class="col col-6">
										<label class="input">
											<i class="icon-prepend fa fa-phone"></i>
											<input type="phone" name="user_phone" placeholder="{:L('user_phone')}" value="{$rel[phone_num]}">
											<b class="tooltip tooltip-bottom-left">{:L('user_phone_tip')}</b> 
										</label>
									</section>
								</div>	
								<div class="row">
									<section class="col col-6">
										<label class="input">
											<i class="icon-prepend fa fa-male"></i>
											<input type="text" name="user_leader" placeholder="{:L('user_leader')}" value="{$rel[leader]}">
											<b class="tooltip tooltip-bottom-left">{:L('user_leader_tip')}</b> 
										</label>
									</section>
									<section class="col col-6">
										<label class="input">
											<i class="icon-prepend fa  fa-envelope"></i>
											<input type="email" name="user_leader_email" placeholder="{:L('user_leader_email')}" value="{$rel[leader_email]}">
											<b class="tooltip tooltip-bottom-left">{:L('user_leaderemail_tip')}</b> 
										</label>
									</section>
								</div>	
								<div class="row">
									<section class="col col-6">
										<label class="input">
											<i class="icon-prepend fa fa-group"></i>
											<input type="text" name="user_department" placeholder="{:L('user_department')}" value="{$rel[department]}">
											<b class="tooltip tooltip-bottom-left">{:L('user_department_tip')}</b> 
										</label>
									</section>
									<section class="col col-6">
									<label class="select">
									<select name="user_lang">
									 <if condition="$rel[department] eq zh-cn"> 
							      <option  value="zh-cn" selected="selected">zh-cn</option>
							      <option value="en-us">en-us</option>
							    <else/>
							    <option value="en-us" selected="selected">en-us</option>
							     <option  value="zh-cn">zh-cn</option>
							    </if>
									</select>
									<i></i>
									</label>
									</section>
								</div>
								</fieldset>
								<fieldset>
								<section>
									<div class="inline-group">
									 <if condition="$rel[status] eq 1"> 
							      <label class="radio">
											<label class="radio">
											<input type="radio" name="user_status" value="1" checked="checked">
										<i></i>{:L('user_status_1')}</label>
										<label class="radio">
											<input type="radio" name="user_status" value="0">
										<i></i>{:L('user_status_0')}</label>
							    <else/>
							     <label class="radio">
											<input type="radio" name="user_status" value="1" >
										<i></i>{:L('user_status_1')}</label>
										<label class="radio">
											<input type="radio" name="user_status" value="0" checked="checked">
										<i></i>{:L('user_status_0')}</label>
							    </if>
										
									</div>
								</section>
								</fieldset>
								<fieldset>
							<section>
											<label class="label">{:L('user_role')}</label>
													<div class="inline-group">
														
														    <volist name="rolerel" id="vo">
														   <label class="checkbox">
														   
														    <if condition="in_array($vo[role_id],$userrole)">
															<input name="role[]" type="checkbox" value="{$vo.role_id}" checked='checked'>
															 <else/>
															 <input name="role[]" type="checkbox" value="{$vo.role_id}">
															 </if>
															<i></i>
															    <if condition="I('cookie.think_language') eq 'zh-cn'">{$vo.name}
															    <else/> {$vo.en_name}
															    </if>
															</label>
														    </volist>
														
													</div>
													</section>
							</fieldset>
							<footer>
								<input type="hidden" name="dosubmit" value='1'/>
								<button type="submit" class="btn btn-primary">
									{:L('cms_submit')}
								</button>	
								</footer>
							
							
							
							
							</form>
							</div>
					</div>
				</div>
			
				<!-- end row -->
<script>
$(document).ready(function() {
	
	$('#user-form').ajaxForm(function(data) { 
		if(data.status==200){
       	 	showhidetip(data.msg,2);
            window.location.href="{$Think.config.SUB_PATH}#{$Think.config.SUB_PATH}index.php?m=admin&c=user&a=index";return false;
       	}else if(data){
       		showhidetip(data.msg,2);return false;
       	}else{
       		showhidetip("{:L('cms_other_error')}",2);return false;
       	}
});
});

</script>
